package com.qiaoda.service;

import io.searchbox.client.JestResult;
import io.searchbox.core.SearchResult;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/3/9 0009.
 */
public interface JestService {

    public boolean createIndex(String indexName) throws Exception;

    public boolean createIndexMapping(String source) throws Exception;

    public String getIndexMapping() throws Exception;

    public boolean index(List<Object> objs) throws Exception;

    public SearchResult search(String query) throws Exception;

    public Double count(String query) throws Exception;

    public JestResult get(String id) throws Exception;

    public boolean deleteIndex(String indexName) throws Exception;

    public boolean delete(String id) throws Exception;

    public void closeJestClient() throws Exception;

}
